<template>
    <div>

        <div>
            <div>
                <van-row>
                    <van-col span="24">
                        <van-icon id="fanhui" @click="tuichu()" name="cross" />
                    </van-col>
                </van-row>
            </div>
        </div>
        <div>
            <van-cell>
                <!-- 使用 title 插槽来自定义标题 -->
                <template #title>
                    <span class="custom-title">{{address.name}}</span>
                </template>
                <template #value>
                    <span class="custom-title">{{ address.phone }}</span>
                </template>
                <template #label>
                    <span class="custom-title">{{address.detail}}</span>
                </template>
            </van-cell>
        </div>

        <div>
            <van-submit-bar style="bottom: 0" :price="zongjia" button-text="提交订单" @click="submit()" />
        </div>
    </div>
</template>

<script>
    export default {
        name: "Adress",
        data(){
            return{
                address:{
                    name:"赵先生",
                    phone:"18515990152",
                    detail:"河南省二七区航海路60号海为科技园"
                },
                zongjia:0.0,
                name:""
            }
        },
        methods:{
            submit(){
                this.$router.push({path:"/buy",query:{money:this.zongjia,name:this.name}})
            },
            tuichu(){
                history.back();
            }
        },
        mounted(){
            var money=this.$route.query.money
            var name=this.$route.query.name

            this.zongjia=money
            this.name=name
        }
    }
</script>

<style scoped>

</style>